package com.atom.module.lib.opengles.util

import java.io.Closeable
import java.lang.Exception
import java.lang.RuntimeException

/**
 * All rights Reserved, Designed By www.rongdasoft.com
 * @version V1.0
 * @Title: ClosedUtils
 * @Description:
 * @author: wuyongzheng
 * @date: 2022/1/18
 * @Copyright: 2022/1/18 www.rongdasoft.com Inc. All rights reserved.
 */
object ClosedUtils {

    fun closeSilently(closeable: Closeable?) {
        try {
            closeable?.close()
        } catch (rethrown: RuntimeException) {
            throw rethrown
        } catch (ignored: Exception) { // silently ignore checked exceptions
        }
    }
}